Most drivers have their own range of devices they claim and the tty
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 13 Dec 2005 21:05:18 +0000 (22:05 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 13 Dec 2005 21:05:18 +0000 (22:05 +0100)
index is identical to the device file index.  For us, the tty index is
always zero regardless of the device file index.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
linux-2.6-xen-sparse/drivers/xen/console/console.c

index 292d4beaade9ecf4e8435499fcedf65bcce713a0..3b106f820443c651a65543ee7dc683acc845c1ea 100644 (file)
@@ -168,7 +168,7 @@ static void kcons_write_dom0(
 
 static struct tty_driver *kcons_device(struct console *c, int *index)
 {
-       *index = c->index;
+       *index = 0;
        return xencons_driver;
 }
 
@@ -213,6 +213,9 @@ static int __init xen_console_init(void)
                return __RETCODE;
        }
 
+       /* We only bind to one device index (-1 means all indexes). */
+       kcons_info.index = xc_num;
+
        wbuf = alloc_bootmem(wbuf_size);
 
        register_console(&kcons_info);